package com.training.java.dao;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Assert;
import org.junit.Test;

public class EmployeeDaoImplTest {

	@Test
	public void testgetAllEmployees()throws Exception 
	{
			
		EmployeeDAO empdao= new EmpDaoJdbcImpl("jdbc:oracle:thin:@localhost:1521:xe","hr","password");
		List<Employee> employeelist = empdao.getAllEmployees();
		Assert.assertNotNull(employeelist);
		Assert.assertFalse(employeelist.isEmpty());
		for(Employee emp: employeelist)
		{
			System.out.println("emp id: " + emp.getEmployeeId());
			System.out.println("emp first name "+ emp.getFirstName());
			System.out.println("emp id: " + emp.getLastName());
					
		}
		
		
	}

}
